package cc.rengu.igas.opms.common.enums;

/**
 * 渠道类型枚举类
 * Created by
 */
public enum WechatChannelTypeEnum {
    NATIVE("0", "NATIVE"),
    MWEB("1", "MWEB"),
    JSAPI("2", "JSAPI"),
    APP("3", "APP"),
    MPRO("4", "JSAPI"),
    ;
    private String srcType;
    private String dstType;

    WechatChannelTypeEnum(String srcType, String dstType) {
        this.srcType = srcType;
        this.dstType = dstType;
    }

    public String getSrcType() {
        return srcType;
    }

    public void setSrcType(String srcType) {
        this.srcType = srcType;
    }

    public String getDstType() {
        return dstType;
    }

    public void setDstType(String dstType) {
        this.dstType = dstType;
    }

    public static String get(String srcType) {
        for (WechatChannelTypeEnum type : WechatChannelTypeEnum.values()) {
            if (type.getSrcType().equals(srcType)) {
                return type.getDstType();
            }
        }
        return null;
    }
}
